using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_WAREHOUSE.
    /// </summary>
    public class DM_WAREHOUSE
    {
              private string _WHID;
      private string _WHName;
      private string _WHAdress;
      private string _WHPhone;
      private string _WHKeeper;
      private string _WHNotes;
      private string _IDPOS;
      private DM_WAREHOUSEMETERIALList _listDM_WAREHOUSEMETERIAL;
      private WAREHOUSE_PRODUCTList _listWAREHOUSE_PRODUCT;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetWHID; 
      public bool IsWHIDNullable   
      { 
	 get { return false;  } 
      }
      public string WHID
      {
         get { return _WHID; }
         set 
	    { 
 		 _WHID = value;
		IsSetWHID = true;
 	    }
      }
    public bool IsSetWHName; 
    public bool IsWHNameNullable   
    { 
		get { return false;  } 
    }
    public string WHName
    {
        get{ return _WHName;  }
        set
		{
			_WHName = value;
			IsSetWHName = true;
		}
    }
    public bool IsSetWHAdress; 
    public bool IsWHAdressNullable   
    { 
		get { return false;  } 
    }
    public string WHAdress
    {
        get{ return _WHAdress;  }
        set
		{
			_WHAdress = value;
			IsSetWHAdress = true;
		}
    }
    public bool IsSetWHPhone; 
    public bool IsWHPhoneNullable   
    { 
		get { return false;  } 
    }
    public string WHPhone
    {
        get{ return _WHPhone;  }
        set
		{
			_WHPhone = value;
			IsSetWHPhone = true;
		}
    }
    public bool IsSetWHKeeper; 
    public bool IsWHKeeperNullable   
    { 
		get { return false;  } 
    }
    public string WHKeeper
    {
        get{ return _WHKeeper;  }
        set
		{
			_WHKeeper = value;
			IsSetWHKeeper = true;
		}
    }
    public bool IsSetWHNotes; 
    public bool IsWHNotesNullable   
    { 
		get { return false;  } 
    }
    public string WHNotes
    {
        get{ return _WHNotes;  }
        set
		{
			_WHNotes = value;
			IsSetWHNotes = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }
public DM_WAREHOUSEMETERIALList DM_WAREHOUSEMETERIALList 
{ 
	get { return _listDM_WAREHOUSEMETERIAL; }
	set { _listDM_WAREHOUSEMETERIAL = value;}
}
public WAREHOUSE_PRODUCTList WAREHOUSE_PRODUCTList 
{ 
	get { return _listWAREHOUSE_PRODUCT; }
	set { _listWAREHOUSE_PRODUCT = value;}
}

        #endregion

        #region Constructors
        public DM_WAREHOUSE()
        {
            Reset();
        }
        public DM_WAREHOUSE(DM_WAREHOUSE obj)
        {
            	this._WHID = obj.WHID;
	this._WHName = obj.WHName;
	this._WHAdress = obj.WHAdress;
	this._WHPhone = obj.WHPhone;
	this._WHKeeper = obj.WHKeeper;
	this._WHNotes = obj.WHNotes;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _WHID = EmptyValues.v_string;
         _WHName = EmptyValues.v_string;
         _WHAdress = EmptyValues.v_string;
         _WHPhone = EmptyValues.v_string;
         _WHKeeper = EmptyValues.v_string;
         _WHNotes = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
	_listDM_WAREHOUSEMETERIAL = null;
	_listWAREHOUSE_PRODUCT = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["WHID"] is DBNull))
		{
			obj.WHID = (string)reader["WHID"];
		}
                if(!(reader["WHName"] is DBNull))
		{
			obj.WHName = (string)reader["WHName"];
		}
                if(!(reader["WHAdress"] is DBNull))
		{
			obj.WHAdress = (string)reader["WHAdress"];
		}
                if(!(reader["WHPhone"] is DBNull))
		{
			obj.WHPhone = (string)reader["WHPhone"];
		}
                if(!(reader["WHKeeper"] is DBNull))
		{
			obj.WHKeeper = (string)reader["WHKeeper"];
		}
                if(!(reader["WHNotes"] is DBNull))
		{
			obj.WHNotes = (string)reader["WHNotes"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _WHID = (reader["WHID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHID"];
//            _WHName = (reader["WHName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHName"];
//            _WHAdress = (reader["WHAdress"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHAdress"];
//            _WHPhone = (reader["WHPhone"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHPhone"];
//            _WHKeeper = (reader["WHKeeper"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHKeeper"];
//            _WHNotes = (reader["WHNotes"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["WHNotes"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string WHID, string WHName, string WHAdress, string WHPhone, string WHKeeper, string WHNotes, string IDPOS)
        {
                     this._WHID = WHID;
         this._WHName = WHName;
         this._WHAdress = WHAdress;
         this._WHPhone = WHPhone;
         this._WHKeeper = WHKeeper;
         this._WHNotes = WHNotes;
         this._IDPOS = IDPOS;
        }
    }
}